<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/parser.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('parser_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/parser.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="parser-tools_8h_source.html">parser-tools.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="graph_8h_source.html">graph.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for parser.h:</div>
<div class="dyncontent">
<div class="center"><img src="parser_8h__incl.png" border="0" usemap="#includes_2parser_8h" alt=""/></div>
<map name="includes_2parser_8h" id="includes_2parser_8h">
<area shape="rect" id="node3" href="parser-tools_8h.html" title="parser&#45;tools.h" alt="" coords="352,83,453,112"/><area shape="rect" id="node22" href="graph_8h.html" title="graph.h" alt="" coords="477,83,541,112"/><area shape="rect" id="node5" href="lex-tools_8h.html" title="lex&#45;tools.h" alt="" coords="389,160,472,189"/><area shape="rect" id="node11" href="lexer_8h.html" title="lexer.h" alt="" coords="155,160,216,189"/><area shape="rect" id="node27" href="edgeID_8h.html" title="edgeID.h" alt="" coords="291,160,365,189"/><area shape="rect" id="node32" href="edgeGraph_8h.html" title="edgeGraph.h" alt="" coords="597,160,693,189"/></map>
</div>
</div>
<p><a href="parser_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="parser_8h.html#a675d767869bc5efaf4d3c53215dc8b4b">parseGraph</a> (FILE *file, int *_N)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a675d767869bc5efaf4d3c53215dc8b4b"></a><!-- doxytag: member="parser.h::parseGraph" ref="a675d767869bc5efaf4d3c53215dc8b4b" args="(FILE *file, int *_N)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="graph_8h.html#a804cfb50d20c745519ebc5a645437049">Pgraph</a> <a class="el" href="parser_8h.html#a675d767869bc5efaf4d3c53215dc8b4b">parseGraph</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>_N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>effettua il parsing di un file contenente un grafo. La BNF di un file sintatticamente corretto e' la seguente:</p>
<table class="doxtable">
<tr>
<th>definizione regolare </th><th>produzioni  </th></tr>
<tr>
<th>program </th><th>{stat}<sup>+</sup>  </th></tr>
<tr>
<th>stat </th><th>numberstat|capacity|timelistofedges|depot  </th></tr>
<tr>
<th>numberstat </th><th><b>NUMBER</b> number|<b>NUMBER</b>numberof  </th></tr>
<tr>
<th>number </th><th>: <b>filename</b>  </th></tr>
<tr>
<th>numberof </th><th><b>OF</b> numberofveritices|<b>OF </b>numberofedges  </th></tr>
<tr>
<th>numberofvertices </th><th><b>VERTICES</b> : <b>intconst</b>  </th></tr>
<tr>
<th>numberofedges </th><th><b>EDGES</b> : <b>intconst</b>  </th></tr>
<tr>
<th>capacity </th><th><b>CAPACITY</b> : <b>intconst</b>  </th></tr>
<tr>
<th>time </th><th><b>TIME</b> : <b>intconst</b>  </th></tr>
<tr>
<th>listofedges </th><th><b>LIST</b> <b>OF</b> <b>EDGES</b> : edgelist  </th></tr>
<tr>
<th>depot </th><th><b>DEPOT</b> : <b>intconst</b>  </th></tr>
<tr>
<th>edgelist </th><th>{edgedef}<sup>+</sup>  </th></tr>
<tr>
<th>edgedef </th><th>( <b>intconst</b> , <b>intconst</b> ) <b>COST</b> <b>intconst</b> <b>DEMAND</b> <b>intconst</b> <b>PROFIT</b> <b>floatconst</b>  </th></tr>
</table>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>file esistente ed aperto in lettura </li>
<li>file non NULL </li>
<li>_N non NULL </li>
<li>file e' sintatticamente corretto </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>viene allocato in memoria un'istanza di <a class="el" href="structGraph.html">Graph</a></li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>il file in cui sono contenuti i dati del grafo </td></tr>
    <tr><td class="paramname">_N</td><td>una cella di memoria in cui inserire il numero dei vertici del grafo stesso </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore che indica un'istanza di <a class="el" href="structGraph.html">Graph</a> in memoria </dd></dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="parser_8h.html">parser.h</a>      </li>

    <li class="footer">Generated on Wed Sep 4 2013 06:38:57 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
